import Detail from '@/views/detail.vue'
import Login from '@/views/login.vue'
import Register from '@/views/register.vue'
import Collect from '@/views/collect.vue'
import City from '@/views/city.vue'
import ManageHouse from '@/views/manageHouse.vue'
import RentHouse from '@/views/rentHouse.vue'
import Search from '@/views/search.vue'
import Map from '@/views/map.vue'

import Layout from '@/views/layout'
import Home from '@/views/second/home'
import Looking from '@/views/second/looking'
import News from '@/views/second/news'
import My from '@/views/second/my'


const routes = [
 
  {redirect: 'home',
    path: '/', component: Layout,
     children: [
      {path: 'home', component: Home},
      {path: 'looking', component: Looking},
      {path: 'news', component: News},
      {path: 'my', component: My},
    ],
     
  },
  { path: '/login', component: Login },
  {path: '/register', component:Register },
  { path: '/detail/:id', component: Detail },
  { path: '/city', component: City },
  { path: '/collect', component: Collect },
  { path: '/manageHouse', component: ManageHouse },
  { path: '/rentHouse', component: RentHouse },
  { path: '/search', component: Search },
  {path: '/map', component:Map },
 
]

export default routes